<{include file="section/admin/admin_header.tpl"}>
<body>
<{include file="section/admin/admin_header_login_bar.tpl"}>
<div id="contentA" class="clear" style="width:1300px;">
	<!--leftsidebar sr-->
	<{include file="section/admin/admin_left_sidebar.tpl"}>
    <!--/leftsidebar end-->
    <div class="rightCont">
    	<!--path st-->
		<{include file="section/admin/admin_header_position.tpl"}>
		<div class="path">您的位置：<a href="/">首页</a>&gt;<a href="/task/list">任务管理</a>&gt; 待审核任务列表</div>
		<!--/path end-->
		
		<h2 class="title01"><span>任务管理-待审核任务列表</span></h2>
        <div class="line1"></div>
			<ul id="tab"></ul>
		<div style="clear:both;"></div>
		<div class="line1"></div>
	
		<div class="box02">
			<div class="box02_1">	
			<div class="search02 clear">
				<ul><li></li></ul>
			</div>
			<form action="/task/verify" method="post" name="frm" id="frm">
				<input type="hidden" name="action_id" id="action_id" value="" />
				<input type="hidden" name="task_id" id="task_id" value="" />
				<input type="hidden" name="reason_ee" id="reason_ee" value="" />
				<div class="box02_Tab">
					<div class="table01">
						<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
							<tr class="th">
								<th><div>任务号</div></th>
								<th><div>创建人</div></th>
								<th><div>用户</div></th>
								<th><div>任务类型</div></th>					
								<th><div>等待谁的创建</div></th>
								<th><div>开始时间</div></th>
								<th><div>描述</div></th>
								<th><div>审核</div></th>
								</tr>

							<{foreach from = $datas item=data}>
							<tr>
								<td><{$data.id}></td>
								<td><{$data.creater}></td>
								<td><{$data.uname}></td>
								<td><{$data.type_name}></td>
								<td>运营</td>
								<td><{$data.create_time}></td>
								<td><{$data.desc}></td>
								<td>
								<input type="button" name="pass" value="通过" onclick="submit_verify(<{$data.id}>,32);" />
								<input type="button" name="reject" value="拒绝" onclick="submit_verify(<{$data.id}>,48)" />
								</td>
							</tr>
							<{/foreach}>
							<div id="reason_id" style="display:none;">
							<textarea name="reason" id="reason" cols="35" rows="5"></textarea>
							</div>
						</table>
						<script language="javascript">
						<!--
						//table("表格名称","默认背景""鼠标经过背景","最后一行鼠标经过背景");
						table("table","bg","bg1","bg2");
						-->
						</script>
				</div>
			</div>
			</form>
			<div class="page clear">
			</div>
			共计：<{$total}> <{$pagination}>
			</div>
		</div>
	</div>
</div>
</div>
<script>
function submit_verify(task_id, action_id)
{

	if(!task_id || !action_id)
	{
		alert('参数错误');

		return false;
	}

	var is_show	= document.getElementById("reason_id").style.display;
	
	if(is_show == 'none')
		document.getElementById("reason_id").style.display = 'block';
	else
		document.getElementById("reason_id").style.display = 'none';

	var reason1	=  document.getElementById("reason").value;

	if(reason1){

		alert(reason1);

		document.getElementById('task_id').value = task_id;	
		
		document.getElementById('action_id').value = action_id;	
		
		document.getElementById('reason_ee').value = reason1;

		document.getElementById('frm').submit();

	}else{

		alert('请填写理由');
	
		return false;
	}

}
</script>

</body>
</html>
